//
//  BaseViewController.h
//  CreditHub
//
//  Created by xinhualong on 2024/9/12.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN


@protocol SelectImageDelegate <NSObject>

// 定义必须实现的方法
- (void)selectedFinishTaskWithResultImage:(UIImage *)image sourceType:(NSInteger )sourceType type:(NSString *)type;

@end

//sourceType 1photograph 2aloum
typedef void(^SelectImageBlock)(UIImage *image,NSUInteger sourceType);

@interface BaseViewController : UIViewController
@property (nonatomic, strong) UIView *ch_navigationView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIImageView *titleImageView;
@property (nonatomic, strong) UIImageView *navBgImageView;
@property (nonatomic, strong) UIButton *backButton;

@property (nonatomic, strong) UIImage *ch_titleImage;
@property (nonatomic, copy) NSString *ch_title;
@property (nonatomic, weak) id<SelectImageDelegate> delegate;

// upload

@property (nonatomic, copy) NSString *pointType;
@property (nonatomic, copy) NSString *startTime;
@property (nonatomic, copy) NSString *endTime;
@property (nonatomic, copy) NSString *orderNo;


@property (nonatomic, copy) NSString *cardType;
@property (nonatomic, assign) UIImagePickerControllerSourceType sourceType;
@property (nonatomic,copy) SelectImageBlock block;
- (void)openCameraOrGalleryType:(NSString*)type;
- (void)selectImage:(UIImagePickerControllerSourceType)sourceType type:(NSString *)type;

#pragma mark ---- public upload

- (void)everyTimeUpdateHomeInfo;

- (void)requestUploadPointType;

@end

NS_ASSUME_NONNULL_END
